//
//  TKYTitleViewCell.m
//  StationHouseHelper
//
//  Created by apple on 2018/6/19.
//  Copyright © 2018年 铁科院. All rights reserved.
//

#import "TKYTitleViewCell.h"
@interface TKYTitleViewCell()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *widthImageV;




@end
@implementation TKYTitleViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
}

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self.contentView addSubview:self.imageV];
        [self.contentView addSubview:self.titleLabel];
        
        [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self).with.offset((kScreenWidth-3)/3/2 - kWidthScale *20 );
            make.top.equalTo(self.contentView).with.offset(kWidthScale*10);;
            make.height.mas_equalTo(kHeightScale *50);
            make.width.mas_equalTo(self.imageV.mas_height);
        }];
        
        [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.imageV.mas_left);
            make.right.equalTo(self.imageV.mas_right).with.offset(kWidthScale*0);
            make.top.equalTo(self.imageV.mas_bottom).with.offset(0);;
            make.bottom.equalTo(self.contentView).with.offset(kHeightScale *5);;
        }];
        
    }
    return self;
}

- (UIImageView *)imageV {
    if (_imageV == nil) {
        _imageV = [[UIImageView alloc]init];
       // _imageV.backgroundColor = [UIColor redColor];;
    }
    return _imageV;
}

- (UILabel *)titleLabel{
    if (_titleLabel == nil) {
        _titleLabel = [[UILabel alloc]init];
        _titleLabel.textAlignment = NSTextAlignmentCenter;
        _titleLabel.font = Font(11);
        _titleLabel.textColor = kUIColorFromRGB(666666, 1);
        //_titleLabel.text = @"123";
    }
    return _titleLabel;
}

@end
